A user agent that conforms to a markup language is able to process documents written in that markup language. For example, a web browser that conforms to Hyper Text Markup Language (HTML) is able to process HTML documents. The document may include a markup element that references a resource. A non-exhaustive list of examples for the resource includes a picture, an audio file, a video file, an executable file, and another document written in the markup language.
The user agent will retrieve the resource from its location as specified in the markup element via a communication system. The content of the resource retrieved by the user agent may differ from what the author of the document intended. For example, due to noise in the communication system or due to other technical problems, the resource retrieved by the user agent may have errors. In another example, the resource may have been replaced, either accidentally or maliciously, by another resource.
For example, a webpage authored by a person includes a picture of a flower that is stored on a remote server. When the author of the webpage included in it a reference to the picture on the remote server, the referenced picture was the picture of the flower. Sometime after the webpage was authored, the picture of the flower was replaced at the remote server with a picture of a donkey. As long as the picture of the donkey has the same filename as the picture of the flower, when a user accesses the webpage, the picture of the donkey will be displayed instead of the picture of the flower.
In another example, a main website has large files available for download, and a mirror website stores copies of these large files. When a user at the main website clicks on a hyperlink to download one of the large files, the user's browser is redirected to download the large file from the mirror website. If the large file at the mirror website has a virus how is the user to know that the large file downloaded from the mirror website is a true copy of the large file at the main website? Currently, the main website hosts a hash of the large file. The user can download the hash from the main website, compute a hash of the large file downloaded from the mirror website, and compare the two. But the onus is on the user to do this. If the computed hash matches the hash downloaded from the main website, the user knows that the large file downloaded from the mirror website is identical to that on the main website.